package com.jarvis.core.plugin;

import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.dynamic.DynamicType;
import net.bytebuddy.matcher.ElementMatcher;

/**
 * @author xuxukang
 * @date 2019-07-04 11:15
 */
public interface PluginDefine extends PluginConfig {

  /**
   * 定义如何增强
   */
  DynamicType.Builder<?> define(TypeDescription typeDescription,
                                DynamicType.Builder<?> builder, ClassLoader classLoader);

  /**
   * 获取需要拦截的类的Matcher
   */
  ElementMatcher<? super TypeDescription> typeMatcher();

  /**
   * 获取需要忽略的类的Matcher
   */
  ElementMatcher<? super TypeDescription> ignore();

}
